package com.property.manage.controller.fee;

import com.guardchina.framework.mybatis.model.CustomPage;
import com.property.manage.model.fee.CollectionVo;
import com.property.manage.model.fee.PropertyVo;
import com.property.manage.model.system.SysSet;
import com.property.manage.service.fee.CollectionService;
import com.property.manage.service.fee.PropertyService;
import com.property.manage.service.system.SysSetService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * 描述
 *
 * @author lwb
 * @since 2020/7/16
 */
@Api(tags = "催收管理")
@RestController
@RequestMapping("/collection")
@Validated
@AllArgsConstructor
public class CollectionController {

    @Autowired
    private CollectionService collectionService;


    @ApiOperation("列表")
    @GetMapping("/page")
    public CustomPage<CollectionVo> userPage(@ApiParam("当前页码") @RequestParam("pageNo") @NotNull(message = "请输入当前页码") Long pageNo,
                                             @ApiParam("每页条数") @RequestParam("pageSize") @NotNull(message = "请输入每页条数") Long pageSize,
                                             @ApiParam("缴费时间") @RequestParam(value = "nextPayDate", required = false) String nextPayDate){
        return collectionService.getPage(pageNo,pageSize,nextPayDate);
    }


}
